<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"+ request.getServerName() + ":" + request.getServerPort()+ path + "/";	
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
	<title>井冈山智慧社区官网--后台管理</title>
	<meta http-equiv="X-UA-Compatible" content="IE=9" />
	<link rel="stylesheet" type="text/css" href="<%=basePath%>Themes/default/css/reset-min.css"/>
	<link rel="stylesheet" type="text/css" href="<%=basePath%>Themes/default/css/login.css"/> 
	<script type="text/javascript">if (!-[1,] && !window.XMLHttpRequest) window.location = "ie6.html"</script>
	<script type="text/javascript" src="<%=basePath%>Scripts/jquery/jquery-1.7.1.min.js"></script> 
	<script type="text/javascript" src="<%=basePath%>Scripts/jquery/jquery.modev.js"></script>
	<script type="text/javascript" src="<%=basePath%>Scripts/animate.js"></script>   
	<script type="text/javascript"> 
		$(function () {			  			
			
			$("#loginForm").bind("submit",function(){ 					
					if($("#userName").val() == "" || $("#userName").val() == "请填写用户名"){						
			    		$("#error").html("请填写用户名");
			   			return false;
			   		}
			    	if($("#password").val() == ""){
			    		$("#error").html("请填写密码");
			   			return false;
			   		}
			});
			
		}); 
    </script>
</head>
<body >
	<div id="login2" class="login_main">
		<div class="login_body">
			<!-- logo -->
			<div class="login_head">
				<div class="login_logo"></div>							
			</div>
			<!-- 登录框 -->
			<div class="login_form">
				<form  id="loginForm" name="loginForm" method="post" action="AdminUser/login.htm">
					<div class="modern">
						<input autocomplete="off" name="userName" id="userName" type="text" 
						class="user_text" value="" placeholder="请输入用户名"  value=""/></td>
						
						<input autocomplete="off" name="password" id="password" type="password"
										class="pass_text" value="" placeholder="请输入密码 "  value=""/>
						<div class="checkDiv">
							<input class="checkInput" type="checkbox" checked="checked" value="" name="" />
							<span>下次自动登录</span>
						</div>							
						
						<button type="submit" tabindex="6" class="login_btn" id="index_btn">登&nbsp;&nbsp;录</button>						
					</div>
					<div id="error" class="errdiv">						
					</div>
				</form>		
			</div>
		</div>		
		<!-- foot -->
		<div class="lgoin_foot">
			<span>技术支持：江西电信信息产业有限公司 版权所有：Copyright © 2015井冈山智慧社区  建议浏览器IE8.0以上</span>		
		</div>
	</div>

	<script type="text/javascript">      
    function login(){
    	if($("#userName").val() == "" || $("#userName").val() == "请填写用户名"){
    		$("#error").html("请填写用户名");
   			return;
   		}
    	if($("#password").val() == ""){
    		$("#error").html("请填写密码");
   			return;
   		}    	 
   	    $('#loginForm').submit();
    }
    
  	//按Enter键登录
    document.onkeydown = function (e){
         var theEvent = window.event || e;
         var code = theEvent.keyCode || theEvent.which;
         if(code == 13){
             login();
         }
     }
	</script>
</body>
</html>
